{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% origin %}
{% load widget_tweaks %}
{% load ietf_filters %}
{% load django_bootstrap5 %}
<form id="liaison_search_form"
      action="{% url "ietf.liaisons.views.liaison_list" state=state %}"
      method="get">
    <div class="input-group search_field my-3">
        <!-- [html-validate-disable-block input-missing-label -- labelled via aria-label] -->
        {{ form.text|add_class:"form-control"|attr:"placeholder:Title, body, identifiers, etc."|attr:"aria-label:Liaison search" }}
        <button class="btn btn-primary" type="submit">
            <i class="bi bi-search"></i>
            Search
        </button>
    </div>
    <div class="accordion" id="accordion1">
        <div class="accordion-item">
            <h2 class="accordion-header" id="heading1">
                <button class="accordion-button collapsed"
                        type="button"
                        data-bs-toggle="collapse"
                        data-bs-target="#searchcollapse"
                        aria-expanded="false"
                        aria-controls="searchcollapse">
                    Additional search criteria
                </button>
            </h2>
            <div id="searchcollapse"
                 class="accordion-collapse collapse"
                 aria-labelledby="heading1"
                 data-bs-parent="#accordion1">
                <div class="accordion-body">
                    {% bootstrap_field form.source layout="horizontal" placeholder="From Group(s)" %}
                    {% bootstrap_field form.destination layout="horizontal" placeholder="To Group(s)" %}
                    {% bootstrap_form form layout="horizontal" exclude="text, source, destination" %}
                    <div class="row">
                        <div class="offset-md-2 col-md-10 search_field">
                            <button class="btn btn-primary" type="submit">
                                <i class="bi bi-search"></i>
                                Search
                            </button>
                            <button id="search-clear-btn" class="btn btn-secondary float-end" type="button">Clear</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>